package cn.bingo.yunsj.controller;

import cn.bingo.yunsj.common.result.Response;
import cn.bingo.yunsj.service.DataCacheService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 做全局数据缓存
 */
@Controller
@Api("做全局数据缓存")
@RequestMapping("/cache")
@CrossOrigin
public class DataCacheController {

    @Autowired
    private DataCacheService dataCacheService;

    @RequestMapping(value = "all",method = RequestMethod.GET)
    @ResponseBody
    public Response getAll(){
        return dataCacheService.getAll();
    }
}
